package com.dangdang.kafaka;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 *
 * @author ligeng
 * 2019年6月27日
 */
@Component
public class KafkaProperties {

	@Value(value="${kafka.bootstrap.servers:10.255.242.111:9092}" )
	private String bootstrapServers;
	@Value("${kafka.consumer.threads:3}")
	private Integer consumerThreads = 3;
	@Value("${kafka.group.id}")
	private String groupId;
	@Value("${kafka.enable.auto.commit:true}" )
	private Boolean autoCommit = true;
	@Value("${kafka.session.timeout.ms:15000}" )
	private String sessionTimeout;
	@Value("${kafka.auto.commit.interval.ms:100}" )
	private String interval;
	@Value("${kafka.auto.offset.reset:earliest}" )
	private String reset;
	/**
	 * @return the bootstrapServers
	 */
	public String getBootstrapServers() {
		return bootstrapServers;
	}
	/**
	 * @param bootstrapServers the bootstrapServers to set
	 */
	public void setBootstrapServers(String bootstrapServers) {
		this.bootstrapServers = bootstrapServers;
	}
	/**
	 * @return the consumerThreads
	 */
	public int getConsumerThreads() {
		return consumerThreads;
	}
	/**
	 * @param consumerThreads the consumerThreads to set
	 */
	public void setConsumerThreads(int consumerThreads) {
		this.consumerThreads = consumerThreads;
	}
	/**
	 * @return the groupId
	 */
	public String getGroupId() {
		return groupId;
	}
	/**
	 * @param groupId the groupId to set
	 */
	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}
	/**
	 * @return the autoCommit
	 */
	public Boolean getAutoCommit() {
		return autoCommit;
	}
	/**
	 * @param autoCommit the autoCommit to set
	 */
	public void setAutoCommit(Boolean autoCommit) {
		this.autoCommit = autoCommit;
	}
	/**
	 * @return the sessionTimeout
	 */
	public String getSessionTimeout() {
		return sessionTimeout;
	}
	/**
	 * @param sessionTimeout the sessionTimeout to set
	 */
	public void setSessionTimeout(String sessionTimeout) {
		this.sessionTimeout = sessionTimeout;
	}
	/**
	 * @return the interval
	 */
	public String getInterval() {
		return interval;
	}
	/**
	 * @param interval the interval to set
	 */
	public void setInterval(String interval) {
		this.interval = interval;
	}
	/**
	 * @return the reset
	 */
	public String getReset() {
		return reset;
	}
	/**
	 * @param reset the reset to set
	 */
	public void setReset(String reset) {
		this.reset = reset;
	}


	
	
}
